package basic._02_单例模式;

/**
 * @author： YHSimon
 * @date： 2022-07-08 15:09
 */
// 懒汉式1 线程不安全
public class Singleton {
    private static Singleton instance;
    private Singleton(){}
    public static Singleton getInstance(){
        if(instance==null){
            instance=new Singleton();
        }
        return instance;
    }
}
